﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using MpSoft.Library.BUSS.Contents;
using MpSoft.Library.BUSS.Categories;
using MpSoft.Basic.Utils;


namespace MpSoft.Web.Controls.Article
{
    public partial class ArticleControl : System.Web.UI.UserControl
    {
        #region Var

        private int ItemID = 0;
        private string CategorySeName = string.Empty;

        #endregion

        #region Method

        protected string NewsOrther()
        {
            if (!string.IsNullOrEmpty(CategorySeName))
            {
                var objCate = CategoryBUSS.Category_BySeName(CategorySeName);
                StringBuilder sb = new StringBuilder();
                //sb.Append("<h1>" + objCate.CategoryName + "</h1");
                sb.Append("<div class='article-content'>" + objCate.CategoryDESC + "</div>");
                return sb.ToString();
            }
            return "";
        }

        #endregion

        #region Event

        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["ItemID"] != null)
                int.TryParse(Request.QueryString["ItemID"].ToString(), out ItemID);
            if (Request.QueryString["CategoryCode"] != null)
                CategorySeName = Request.QueryString["CategoryCode"].ToString();
        }

        #endregion

        #region Properties
        #endregion
    }
}